package com.demomaster.quickcompat.sample;

import android.content.Context;
import android.graphics.Color;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.TextView;
import android.widget.Toast;

import com.demomaster.quickcompat.service.QuickFloatingService;

public class MyService extends QuickFloatingService {

    @Override
    public void onCreateView(Context context, WindowManager windowManager) {
        TextView textView = new TextView(context);
        textView.setText("Hello World");
        textView.setBackgroundColor(Color.RED);
        Toast.makeText(context, "Hello World", Toast.LENGTH_SHORT).show();
        WindowManager.LayoutParams layoutParams1 = new WindowManager.LayoutParams();
        layoutParams1.width = ViewGroup.LayoutParams.WRAP_CONTENT;
        layoutParams1.height = ViewGroup.LayoutParams.WRAP_CONTENT;
        addView(textView,layoutParams1,true,0,0);
    }

}
